{m:include "member","header"}
<div class="yzm_member_container main">
    {m:include "member","left"}
    <div class="main_right">
        <div class="tit">
            <h3>修改密码</h3>
        </div>
        <div class="main_cont">
            <form method="post" action="" onsubmit="return chcekall()">
                <table>
                    <tr>
                        <td>原密码：</td>
                        <td><input type="password" name="oldpass" value="" class="input"><span class="red">*</span></td>
                    </tr>
                    <tr>
                        <td>新密码：</td>
                        <td><input type="password" name="password" value="" class="input"><span class="red">*</span></td>
                    </tr>
                    <tr>
                        <td>确认密码：</td>
                        <td><input type="password" name="password2" value="" class="input"><span class="red">*</span></td>
                    </tr>
                    <tr>
                        <td>验证码：</td>
                        <td><input type="text" name="code" value="" class="input" style="width:150px;">
                            <img src="{U('api/index/code')}" onclick="this.src=this.src+'?'" class="yzm-code-img" title="看不清，换一张">
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><input type="submit" name="dosubmit" class="submit" value="提交"></td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
	  function chcekall(){
			if($('input[name="oldpass"]').val() == ''){
				layer.msg('原密码不能为空！', {icon:2});
				return false;
			}
			if($('input[name="password"]').val().length < 6){
				layer.msg('密码不能低于6位！', {icon:2});
				return false;
			}
			if($('input[name="password"]').val() != $('input[name="password2"]').val()){
				layer.msg('两次密码不一致！', {icon:2});
				return false;
			}
			if($('input[name="code"]').val() == ''){
				layer.msg('请输入验证码！', {icon:2});
				return false;
			}
	  }
</script>
{m:include "member","footer"}